package avicit.bdp.dcs.precheck.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * @金航数码科技有限责任公司
 * @作者：liyb
 * @邮箱：liyb@avic-digital.com
 * @创建时间：2020-08-05 13:58
 * @类说明：预检查结果实体类
 * @修改记录：
 */
@ApiModel(value = "JobPrecheckResultDTO", description = "bdp_dcs_job_precheck_result")
@Table(name = "bdp_dcs_job_precheck_result")
public class JobPrecheckResultDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    // 主键
    @Id
    @LogField
    @ApiModelProperty(value = "主键")
    @FieldRemark(column = "id", field = "id", name = "id")
    @javax.persistence.Id
    @Column(name = "id")
    private String id;

    // 迁移id，同步id
    @LogField
    @ApiModelProperty(value = "迁移id，同步id")
    @FieldRemark(column = "job_id", field = "jobId", name = "迁移或同步ID")
    @Column(name = "job_id")
    private String jobId;

    // 预检查项id
    @LogField
    @ApiModelProperty(value = "预检查项id")
    @FieldRemark(column = "precheck_item_id", field = "precheckItemId", name = "预检查项ID")
    @Column(name = "precheck_item_id")
    private String precheckItemId;

    // 检查结果，失败：0，成功：1，进行中：2，等待：3
    @LogField
    @ApiModelProperty(value = "检查结果，失败：0，成功：1，进行中：2，等待：3")
    @FieldRemark(column = "result", field = "result", name = "检查结果")
    @Column(name = "result")
    private Integer result;

    // 组织机构代码
    @ApiModelProperty(value = "组织机构代码")
    @FieldRemark(column = "org_identity", field = "orgIdentity", name = "组织机构代码")
    @Column(name = "org_identity")
    private String orgIdentity;

    // 密级
    @ApiModelProperty(value = "密级")
    @FieldRemark(column = "secret_level", field = "secretLevel", name = "密级")
    @Column(name = "secret_level")
    private String secretLevel;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public String getPrecheckItemId() {
        return precheckItemId;
    }

    public void setPrecheckItemId(String precheckItemId) {
        this.precheckItemId = precheckItemId;
    }

    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    @Override
    public String getOrgIdentity() {
        return orgIdentity;
    }

    @Override
    public void setOrgIdentity(String orgIdentity) {
        this.orgIdentity = orgIdentity;
    }

    @Override
    public String getSecretLevel() {
        return secretLevel;
    }

    @Override
    public void setSecretLevel(String secretLevel) {
        this.secretLevel = secretLevel;
    }

    @Override
    public String getLogFormName() {
        if (StringUtils.isEmpty(super.logFormName)) {
            return "预检查结果模块";
        } else {
            return super.logFormName;
        }
    }

    @Override
    public String getLogTitle() {
        if (StringUtils.isEmpty(super.logTitle)) {
            return "预检查结果";
        } else {
            return super.logTitle;
        }
    }

}